<?php
/**
 * Created by PhpStorm
 * Author Henry
 * Date: 2022/1/17 13:39
 * Email: 1173@mapgoo.net
 */

namespace app\api\validate;
use think\Validate;


class UserValidate extends Validate
{
    /**
     * 验证规则
     */
    protected $rule
        = [
            'openid'                    => 'require',
            'goods_id'                  => 'require',
            'goods_num'                 => 'require',
            'order_pay_money'           => 'require',
            'create_add_vip_time'       => 'require',
            'order_typ'                 => 'require',//订单类型：xufei=续费，xianshi=限时活动购买加入的会员，liji=立即加入直接购买加入的会员，chengzhangka=输入兑换码方式加入会员 |
            'order_get_month'           => 'require',
            'orderid'                   => 'require',
        ];
    
    /**
     * 验证场景
     */
    protected $scene = [
        'openid' => ['openid'],
        'orderid' => ['orderid'],
        'PayRegisterVip' => ['openid','user_id','goods_id','goods_num','order_pay_money','create_add_vip_time','order_typ','order_get_month'],
    ];
}
